amqp_url = "amqps://datanommer:@rabbitmq{{ env_suffix }}.fedoraproject.org/%2Fpubsub"

# Just check if the queue exist, don't try to create it (the server does not allow it).
passive_declares = true

# The topic_prefix configuration value will add a prefix to the topics of every sent message.
# This is used for migrating from fedmsg, and should not be used afterwards.
{% if env == "staging" %}
topic_prefix = "org.fedoraproject.stg"
{% else %}
topic_prefix = "org.fedoraproject.prod"
{% endif %}

[tls]
ca_cert = "/etc/pki/fedora-messaging/cacert.pem"
keyfile = "/etc/pki/fedora-messaging/datanommer-key.pem"
certfile = "/etc/pki/fedora-messaging/datanommer-cert.pem"

[client_properties]
app = "datanommer"
app_url = "https://github.com/fedora-infra/datanommer"

[queues."datanommer{{ env_suffix }}"]
durable = true
auto_delete = false
exclusive = false
arguments = {}

[[bindings]]
queue = "datanommer{{ env_suffix }}"
exchange = "amq.topic"
routing_keys = ["#"]

[consumer_config]
datanommer_sqlalchemy_url = 'postgresql://{{ datanommerDBUser }}:{{ (env == 'production')|ternary(datanommerDBPassword, datanommer_stg_db_password) }}@db-datanommer{{ (env == 'production')|ternary('02', '01') }}{{ env_suffix }}.iad2.fedoraproject.org/datanommer2'
alembic_ini = "/etc/fedora-messaging/alembic.ini"

[log_config]
version = 1
disable_existing_loggers = true
[log_config.formatters.simple]
format = "[%(asctime)s %(levelname)s %(name)s] %(message)s"
[log_config.handlers.console]
class = "logging.StreamHandler"
formatter = "simple"
stream = "ext://sys.stdout"
[log_config.loggers.fedora_messaging]
level = "INFO"
propagate = false
handlers = ["console"]
[log_config.root]
level = "WARNING"
handlers = ["console"]
